#!/bin/bash

# BUILD
xsd2cpp defaultTest.xsd . && ./autogen.sh &&  make install
if [ $? -ne 0 ]; then
  echo "   failed to build in dir: `pwd`"
  exit 1
fi

# TEST
run=./build/bin/defaultTestrun

$run -r t1.xml
if [ $? -ne 0 ]; then
  echo "   test failed in dir: `pwd`"
  exit 1  
fi

$run -r t2.xml
if [ $? -ne 0 ]; then
  echo "   test failed in dir: `pwd`"
  exit 1  
fi

